package com.itheima.setlist;

import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        String s = "90 -1 -1 25 32 32 66";
        String[] e = s.split(" ");

        TreeSet<String> t = new TreeSet<>((o1, o2) -> {
            int result = Integer.parseInt(o1) - Integer.parseInt(o2);
            result = result == 0 ? 1 : result;
            return result;
        });
        for (int i = 0; i < e.length; i++) {
            t.add(e[i]);
        }
        System.out.print("\"");
        int index = 0;
        for (String s1 : t) {
            index++;
            if(index == t.size()){
                System.out.print(s1+"\"");
                break;
            }
            System.out.print(s1+" ");
        }
    }
}
